{{! -------------------------------------------------------------------------- }}
{{! Copyright 2002-2016, OpenNebula Project, OpenNebula Systems                }}
{{!                                                                            }}
{{! Licensed under the Apache License, Version 2.0 (the "License"); you may    }}
{{! not use this file except in compliance with the License. You may obtain    }}
{{! a copy of the License at                                                   }}
{{!                                                                            }}
{{! http://www.apache.org/licenses/LICENSE-2.0                                 }}
{{!                                                                            }}
{{! Unless required by applicable law or agreed to in writing, software        }}
{{! distributed under the License is distributed on an "AS IS" BASIS,          }}
{{! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   }}
{{! See the License for the specific language governing permissions and        }}
{{! limitations under the License.                                             }}
{{! -------------------------------------------------------------------------- }}
<div class="row">
  <div id="template_name_form"  class="medium-6 columns">
    <label  for="NAME">
      {{tr "Name"}}
      <input type="text" wizard_field="NAME" id="NAME" required/>
    </label>
  </div>
  <div  id="template_hypervisor_form" class="medium-6 columns">
    <label>{{tr "Hypervisor"}}</label>
    <input type="radio" wizard_field="HYPERVISOR" name="hypervisor" value="kvm" id="kvmRadio">
    <label for="kvmRadio">{{tr "KVM"}}</label>
    <input type="radio" wizard_field="HYPERVISOR" name="hypervisor" value="vcenter" id="vcenterRadio">
    <label for="vcenterRadio">{{tr "vCenter"}}</label>
  </div>
</div>
<div class="row">
  <div class="medium-6 columns">
    <label  for="DESCRIPTION">
      {{tr "Description"}}
    </label>
    <textarea type="text" wizard_field="DESCRIPTION" id="DESCRIPTION" name="DESCRIPTION" style="height: 70px;"/>
  </div>
  <div class="medium-6 columns">
    <div class="row">
      <div class="medium-6 columns">
        <label  for="LOGO">
          {{tr "Logo"}}
        </label>
        <select wizard_field="LOGO" id="LOGO" name="LOGO">
          <option value=""></option>
          {{#each logos}}
          <option value="{{path}}">{{name}}</option>
          {{/each}}
        </select>
      </div>
      <div id="template_create_logo" class="text-center medium-6 columns" style="margin-bottom: 15px"></div>
      <br></div>
  </div>
</div>
<fieldset class="hypervisor only_vcenter" style="display: none;">
  <legend>{{tr "vCenter"}}</legend>
  <div class="row hypervisor only_vcenter" style="display: none;">
    <div class="medium-6 columns">
      <label  for="vcenter_template_uuid">
        {{tr "vCenter Template UUID"}}
      </label>
      <input type="text" id="vcenter_template_uuid"/>
    </div>
    <div class="medium-6 columns">
      <div class="row">
        <div class="large-6 columns">
          <label>
            {{tr "VM disks"}}
            {{{tip (tr "If selected, VM disks won't be deleted after the VM finishes its lifecycle.")}}}
          </label>
          <input type="checkbox" id="KEEP_DISKS" name="KEEP_DISKS"/>
          <label  for="KEEP_DISKS">{{tr "Keep"}}</label>
        </div>
      </div>
    </div>
  </div>
  <div class="vcenter_datastore_input row">
    <div class="large-3 medium-6 columns">
      <label>
        {{tr "Default Datastore"}}
        <input type="text" class="initial_datastore" value="{{datastore.initial}}"/>
      </label>
    </div>
    <div class="large-3 medium-6 columns">
      <label>
        {{tr "Type"}}
        <select class="modify_datastore">
          <option value="fixed">{{tr "Fixed"}}</option>
          <option value="list">{{tr "Provide on instantiation"}}</option>
        </select>
      </label>
    </div>
    <div class="large-6 medium-12 columns">
      <label>
        {{tr "Available Datastores"}}
        <input type="text" class="available_datastores" value="{{datastore.params}}"/>
      </label>
    </div>
  </div>
  <div class="vcenter_rp_input row">
    <div class="large-3 medium-6 columns">
      <label>
        {{tr "Default Resource Pool"}}
        <input type="text" class="initial_rp" value="{{resourcePool.initial}}"/>
      </label>
    </div>
    <div class="large-3 medium-6 columns">
      <label>
        {{tr "Type"}}
        <select class="modify_rp">
          <option value="fixed">{{tr "Fixed"}}</option>
          <option value="list">{{tr "Provide on instantiation"}}</option>
        </select>
      </label>
    </div>
    <div class="large-6 medium-12 columns">
      <label>
        {{tr "Available Resource Pools"}}
        <input type="text" class="available_rps" value="{{resourcePool.params}}"/>
      </label>
    </div>
  </div>
</fieldset>
<div class="row">
  <div class="capacityCreate large-12 columns">{{{capacityCreateHTML}}}</div>
</div>
{{#isFeatureEnabled "showback"}}
<div class="row">
  <div class="medium-6 columns">
    <fieldset>
      <legend>{{tr "Cost"}}</legend>
      <div class="medium-6 columns">
        <label  for="MEMORY_COST">
          {{tr "Memory"}}
            {{{tip (tr "Cost of each MB per hour")}}}
        </label>
        <input type="number" step="any" min="0" wizard_field="MEMORY_COST" id="MEMORY_COST"/>
      </div>
      <div class="medium-6 columns">
        <label  for="CPU_COST">
          {{tr "CPU"}}
            {{{tip (tr "Cost of each CPU per hour")}}}
        </label>
        <input type="number" step="any" min="0" wizard_field="CPU_COST" id="CPU_COST"/>
      </div>
      <div class="medium-6 columns left">
        <label  for="DISK_COST">
          {{tr "Disk"}}
            {{{tip (tr "Cost of each MB per hour")}}}
        </label>
        <input type="number" step="any" min="0" wizard_field="DISK_COST" id="DISK_COST"/>
      </div>
    </fieldset>
  </div>
</div>
{{/isFeatureEnabled}}
<div class="row">
  <div class="large-6 columns">
    <input type="checkbox" id="sunstone_network_select"/>
    <label  for="sunstone_network_select">
      {{tr "Do not allow to modify network configuration"}}
      {{{tip (tr "Users will not be able to remove or add new NICs")}}}
    </label>
  </div>
</div>
<div class="row">
  <div class="large-12 columns">
    <input type="checkbox" wizard_field="VROUTER" id="VROUTER" value="YES"/>
    <label  for="VROUTER">
      {{tr "Make this template available for Virtual Router machines only"}}
      {{{tip (tr "Virtual Routers create Virtual Machines from a source Template. This checkbox makes this template available to be selected in the New Virtual Router wizard")}}}
    </label>
  </div>
</div>
